package com.fschina.devtools.lock;

import java.net.URL;
import java.util.List;

/**
 * @program: dev-tools
 * @description: zookeeper client
 * @author: QinYanqing
 * @create: 2018-10-19 15:25
 **/
public interface ZookeeperClient {

    void create(String path,boolean ephemeral);

    void delete(String path);

    List<String> getChildren(String path);

    List<String> addChildListener(String path,ChildListener listener);

    void removeChildListener(String path,ChildListener listener);

    void addStateListener(StateListener listener);

    void removeStateListener(StateListener listener);

    boolean isConnected();

    void  close();
//    URL getUrl();

}
